package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.saas.domain.entity.WorkOrderExplainEntity;
import com.xbongbong.saas.domain.entity.ext.WorkOrderExplainEntityExt;

import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
 *
 * @author 魏荣杰
 * @date 2019/3/12 11:04
 * @since v1.0
 * @version v1.0
 */
public interface WorkOrderExplainModel extends IModel<WorkOrderExplainEntity>{
    @Override
    Integer insert(WorkOrderExplainEntity entity) throws XbbException;

    @Override
    Integer update(WorkOrderExplainEntity entity) throws XbbException;

    @Override
    List<WorkOrderExplainEntity> findEntitys(Map<String, Object> param);

    /**
     * 获取没有处理过的表单解释
     *
     * @param entity 查询参数
     * @since V1.0
     * @return List
     * @date 2020/7/30 10:05
     */
    List<WorkOrderExplainEntity> getNoHandleExplainsByFindEntitys(Map<String, Object> entity);

    @Override
    Integer getEntitysCount(Map<String, Object> param);

    Integer deleteByFormId(Long formId, String corpid);

    WorkOrderExplainEntityExt getByFormId(Long formId, String corpid) throws XbbException;

    WorkOrderExplainEntity getByKey(Long key, String corpid) throws XbbException;
    /**
     * Description:
     * @param param
     * @return java.util.List<com.xbongbong.saas.domain.entity.WorkOrderExplainEntity>
     * @author 魏荣杰
     * @date 2019/3/20 11:18
     * @since v1.0
     */
    List<WorkOrderExplainEntity> list(Map<String, Object> param);
    /**
     * Description: 获取工单全部列表的默认解释
     * @return com.xbongbong.saas.domain.entity.WorkOrderExplainEntity
     * @author 魏荣杰
     * @date 2019/8/23 16:22
     * @since v4.2.0
     */
    WorkOrderExplainEntity getDefaultAllListExplain(String corpid);

    List<WorkOrderExplainEntity> getByFormIdIn(Collection<Long> formIdIn, String corpid);

    /**
     * 批量插入实体
     * @param list
     * @return 返回数据的列表
     */
    List<WorkOrderExplainEntity> insertBatch(List<WorkOrderExplainEntity> list);

    /**
     * 批量修改表单解释
     * @param workOrderExplainEntityList
     * @param corpid
     * @return
     */
    Integer updateBatch(List<WorkOrderExplainEntity> workOrderExplainEntityList,String corpid);
    /**
     * 批量删除
     * @param list 主键id集合
     * @param corpid
     * @author xingxing.xiao
     */
    Integer deleteBatch(List<Long> list, String corpid);

    void updateBatchExplain(List<WorkOrderExplainEntity> updateList, String corpid);

    void updateBatchExplainNoCorpid(List<WorkOrderExplainEntity> updateList);
}
